From 0f3954bf57e65caef7b7dd14ea5fccb63fdb2bef Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 4 Dec 2025 11:17:15 +0900 Subject: (김준회) 권한관리 환경변수로 제어: 개발 간 불편 줄이기 위함 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/[lng]/evcp/(evcp)/layout.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/[lng]') diff --git a/app/[lng]/evcp/(evcp)/layout.tsx b/app/[lng]/evcp/(evcp)/layout.tsx index 7fe7f3e7..c5e75a4c 100644 --- a/app/[lng]/evcp/(evcp)/layout.tsx +++ b/app/[lng]/evcp/(evcp)/layout.tsx @@ -12,8 +12,11 @@ export default async function EvcpLayout({ children }: { children: ReactNode }) let isAuthorized = true; let authMessage = ""; - // Only check permission if user is logged in - if (session?.user?.id) { + // Skip permission check if environment variable is set + const skipPermissionCheck = process.env.SKIP_ORACLE_PERMISSION_CHECK === 'true'; + + // Only check permission if user is logged in and check is not skipped + if (session?.user?.id && !skipPermissionCheck) { try { const result = await verifyNonsapPermission( parseInt(session.user.id), @@ -34,7 +37,9 @@ export default async function EvcpLayout({ children }: { children: ReactNode })